<%@page import="cn.jhc.dao.ConnectionFactory"%>
<%@page import="cn.jhc.dao.TitleDAO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="cn.jhc.bean.UserBean"%>
<%
	UserBean user = (UserBean)session.getAttribute("user");
	if(null ==user){
		String getb=(String)request.getParameter("getb");
		RequestDispatcher dispatcher = request.getRequestDispatcher("/login.jsp");
		dispatcher.forward(request, response);
		return;
	}
%>   
<%@ taglib uri="/WEB-INF/FCKeditor.tld" prefix="FCK"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/msg.css"></link>
<title>添加留言</title>
</head>
<script language="javascript" type="text/javascript">
	function closewin(){
		window.opener.location.reload();
		window.close();
	}
	function MM_popupMsg(msg) {
		alert(msg);
	}
</script>
<body onUnload="javascrip:closewin();">
<div id="wappermsg">
	<%
		int integral;
		TitleDAO dao = new TitleDAO();
		dao.setCon(ConnectionFactory.getConnection());
		int userid = user.getId();
		integral = dao.showIntegral(userid);
	%>
	<form method="post" action="./addactmessage.do">
		<p>
			<a>标题:</a> <input type="text" name="title"
				size="40" value=""/>
		</p>
		<p>
			<a>内容:</a>
			<FCK:editor id="content" basePath="./fckeditor/"
			width="380px"
			imageBrowserURL="../filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector"
			linkBrowserURL="../filemanager/browser/default/browser.html?Connector=connectors/jsp/connector"
			flashBrowserURL="../filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector"
			imageUploadURL="../filemanager/upload/simpleuploader?Type=Image"
			linkUploadURL="../filemanager/upload/simpleuploader?Type=File"
			flashUploadURL="../filemanager/upload/simpleuploader?Type=Flash"> 
			</FCK:editor>
		</p>
		<p>
			<div align="center">
			<input type="hidden" name="integral" value="<%=integral%>">
			<input type="hidden" name="page" value="1"> <input
				type="submit" value="提交" onclick="MM_popupMsg('获得3积分')"></input> <input type="reset" value="重置" />
			</div>
		</p>
	</form>
</div>
</body>
</html>